<template>
	<view class="themeItem">
		<navigator url="/pages/category/index"  class="box" v-if="!isMore" open-type="navigate">
			<img class="pic" src="../../common/images/classify1.jpg" mode="aspectFILL" />
			<view class="mask">明星美女</view>
		</navigator>


		<navigator url="/pages/classify/classify" class="box more" v-if="isMore" open-type="switchTab">
			<img class="pic" src="../../common/images/more.jpg" mode="aspectFILL" />
			<view class="mask">
				<uni-icons type="more-filled" size="30" color="#fff"></uni-icons>
				<view class="text">更多</view>
			</view>
		</navigator>
	</view>
</template>

<script setup>
	defineProps({
		isMore: {
			type: Boolean,
			default: false
		}
	})
	// 路由跳转
	const toDetail = () => {
		uni.switchTab({
			url: '/pages/category/index' // 使用 switchTab 导航到 tabBar 页面
		});
	}
</script>

<style scoped lang="scss">
	.themeItem {
		.box {
			height: 340rpx;
			position: relative;

			.pic {
				width: 100%;
				height: 100%;
			}

			.mask {
				width: 100%;
				height: 70rpx;
				position: absolute;
				bottom: 0;
				left: 0;
				background-color: rbga(0, 0, 0, 0.2);
				color: #fff;
				display: flex;
				align-items: center;
				justify-content: center;
				backdrop-filter: blur(40rpx);
				font-weight: 600;
			}
		}

		.box.more {
			.mask {
				width: 100%;
				height: 100%;
				display: flex;
				flex-direction: column;

				.text {
					font-size: 18rpx;
				}
			}
		}
	}
</style>